import fetch from '@/api'

export function getPlanList(params) {
    return fetch({
        method: 'get',
        url: `/shipTally`,
        params
    })
}

export function getPrintList(params) {
    return fetch({
        method: 'get',
        url: `/shipTally/getPrintList`,
        params
    })
}

// 箱号分页
export function getContainerId(params) {
    return fetch({
        method: 'get',
        url: `/shipTally/container`,
        params
    })
}

// 通过ID查询
export function getPlanId(id) {
    return fetch({
        method: 'get',
        url: `/shipTally/${id}`,
    })
}

// 新增
export function addPlanList(data) {
    return fetch({
        method: 'post',
        url: `/shipTally`,
        data
    })
}

// 编辑
export function editPlanList(id, data) {
    return fetch({
        method: 'put',
        url: `/shipTally/${id}`,
        data
    })
}

// 删除
export function deletePlanList(id) {
    return fetch({
        method: 'delete',
        url: `/shipTally/${id}`,
    })
}


// 装拆特殊理货作业-验证历史作业是否存在
export function VerificationHistory(params) {
    return fetch({
        method: 'get',
        url: `/cargoPlan/validHistoryTask`,
        params
    })
}

// 核对,需要记录下核对人和核对时间
export function Verify(data) {
    return fetch({
        method: 'post',
        url: `/cargoPlan/check`,
        data
    })
}

// 退回作业
export function retreatOption(id,data) {
    return fetch({
        method: 'post',
        url: `/shipTally/cancelOperation/${id}`,
        data
    })
}

// 获取计划编号
export function getPlanNums(params) {
    return fetch({
        method: 'get',
        url: `/shipTally/getShipPlan`,
        params
    })
}

// 下载装箱照片
export function downPicList(params) {
    return fetch({
        method: 'get',
        url: `/attachments/business/download`,
        params
    })
}

// 获取大小尺寸
export function getContainerSizeList() {
    return fetch({
        method: 'get',
        url: `/shipTally/getContainerSizeList`
    })
}
